# -*- coding: utf-8 -*-
#from utils.operators.spark_submit import SparkSubmitOperator
#from airflow.operators.bash import BashOperator
#from jms.dm.route.dm_route_city_fast_and_slow import dm__dm_route_city_fast_and_slow
#
#export__route_city_to_oss = SparkSubmitOperator(
#    task_id='export__route_city_to_oss',
#    pool_slots=5,
#    # depends_on_past=True,  # 如果任务依赖于前一天的同名任务，则将 depends_on_past 设为 True
#    # task_concurrency=1,  # 如果任务不支持并发，则将 task_concurrency 设为 1
#    name='export__route_city_to_oss_{{ execution_date | date_add(1) | cst_ds }}',  # yarn 任务名称
#    driver_memory='8G',
#    executor_memory='16G',
#    executor_cores=5,
#    num_executors=32,
#    email=['suning@jtexpress.com','yl_bigdata@yl-scm.com'],
#    conf={'spark.executor.memoryOverhead': 2048,
#          'spark.core.connection.ack.wait.timeout': 3000,
#          'spark.default.parallelism': 600,
#          'spark.locality.wait': 60,
#          },
#    java_class='com.yunlu.bigdata.jobs.route.export.ExportRouteCityData2Oss',  # spark 主类
#    # application='hdfs:///user/spark/work/dm/lyx/pro_aging_data_t2/jobs-1.0-SNAPSHOT-jar-with-dependencies.jar',  # spark jar 包
#    jars='hdfs:///scheduler/jms/spark/cp/export_route_city_data_2_oss/common-1.0-SNAPSHOT.jar',
#    application='hdfs:///scheduler/jms/spark/cp/export_route_city_data_2_oss/original-jobs-1.0-SNAPSHOT.jar',
#    # spark jar 包
#    application_args=['{{ execution_date  | cst_ds }}'],
#    # 参数dt 2020-10-26
#)
#
#upload__route_city_to_oss = BashOperator(
#    task_id="upload__route_city_to_oss",
#    email=['suning@jtexpress.com','yl_bigdata@yl-scm.com'],
#    pool='unlimited_pool',
#    bash_command='jms/oss/export_route_city_to_oss/upload_route_city_data.sh',
#)
#
## 设置依赖
#upload__route_city_to_oss << export__route_city_to_oss << dm__dm_route_city_fast_and_slow
#